home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17471 < prev    next >
Encoding:
Text File  |  1996-08-05  |  701 b   |  31 lines

  1. Path: news.ee.vill.edu!news
  2. From: sheridan@monet.vill.edu
  3. Newsgroups: comp.lang.c++
  4. Subject: Pure virtual destructors?
  5. Date: 16 Apr 1996 00:35:30 GMT
  6. Organization: Villanova University
  7. Message-ID: <4kuq0i$p6t@ftp.ee.vill.edu>
  8. NNTP-Posting-Host: 153.104.7.179
  9.  
  10.  
  11. The rule with destructors is that they are always overridden, right?
  12. That's a quote from VC4 docs, BTW.  When I do this:
  13.  
  14. class CBase {
  15. public:
  16.     virtual ~CBase() = 0;
  17. ...};
  18.  
  19. class CChild : public CBase {
  20. public:
  21.     ~CChild();
  22. ...};
  23.  
  24. and declare a body for ~CChild, I always get unresolved external on
  25. CBase::~CBase.  I have seen this in several cases.  My guess is it's not
  26. a compiler bug, so what am I missing?
  27.  
  28. Thanks.
  29. Pete Sheridan
  30.  
  31.